<template>
    <!-- 左侧导航 -->
    <el-aside width="200px" class="aside">
        <el-menu
            default-active="2"
            class="el-menu-vertical-demo" router
        >
            <NavItem v-for="v in items" :key="v.url" :item="v" />
        </el-menu>
    </el-aside>
        
</template>

<script setup>
import {reactive} from 'vue'
import {
  Document,
  Menu as IconMenu,
  Location,
  Setting,
  PictureFilled
} from '@element-plus/icons-vue'
import NavItem from './navItem.vue'

const items = reactive([
    {name:'首页',icon:Document,url:'/index'},
    {
        name:'电量监控',
        icon:PictureFilled,
        url:'/monitor',
        child:[
            {name:'车辆详情',icon:Setting,url:'/monitor/info'},
            {name:'车辆列表',icon:PictureFilled,url:'/monitor/list'},
        ]
    },
    {name:'车辆监控',icon: Location,url:'/vehicle'},
    {name:'统计分析',icon:Setting,url:'/census'}
])

</script>